package com.forest.core.widget


import android.os.CountDownTimer
import android.widget.TextView


class SmsCountDownTimer(private val mTextView: TextView,private val title: String) : CountDownTimer(60 * 1000, 1000) {

    override fun onTick(millisUntilFinished: Long) {
        mTextView.isClickable = false
        mTextView.isSelected = false
        mTextView.text = "${millisUntilFinished / 1000}S"
    }

    override fun onFinish() {
        mTextView.isClickable = true
        mTextView.isSelected = true
        mTextView.text = title
    }
}
